/***************************************************************************
                        textures.h  -  Part of gltris
                             -------------------
    begin                : March 2001
    copyright            : (C) 2001 by David Delbecq (Alias Tchize)
    email                : david.delbecq@usa.net
 ***************************************************************************/
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

/****************************************************************************
* See associated .c file for functions description.                         *
****************************************************************************/
#ifndef _texture_h_
#define _texture_h_

#define TEX_WOODBLOCK 0
#define TEX_WOODBLOCK2 1
#define TEX_WOODBLOCK3 2
#define TEX_METAL 3
#define TEX_ELECTRICITY 4
#define TEX_METALBLOCK 5
#define TEX_FRONTFACE 6
#define TEX_FONTE 7
#define TEX_FOG 8
#define TEX_GLIGHT 9
#define TEX_FLARE 10
#define TEX_BOXFLARE 11
#define TEX_SPOTLIGHT 12
#define TEX_STARS 13

#define TEX_MAXTEX 13

#ifndef DATA_DIR
/* In case compilator didn't define this symbol according to Makefile */
#define DATA_DIR "./Data/"
#endif
#define DIRECTORY_PICS DATA_DIR

#define FILE_WOODBLOCK "wood.tga"
#define FILE_WOODBLOCK2 "wood2.tga"
#define FILE_WOODBLOCK3 "wood3.tga"
#define FILE_METAL "metal.tga"
#define FILE_ELEC "electricity.tga"
#define FILE_METALBLOCK "metalbox.tga"
#define FILE_BMARBLEBLOCK "marble.tga"
#define FILE_FRONT_FACE "face.tga"
#define FILE_FONTE "fonte2.tga"
#define FILE_FOG "fog.tga"
#define FILE_GLIGHT "ground_light.tga"
#define FILE_FLARE "flare.tga"
#define FILE_BOXFLARE "boxflare.tga"
#define FILE_SPOTLIGHT "spotlight.tga"
#define FILE_STARS NULL


#define TEXFILELIST {FILE_WOODBLOCK,FILE_WOODBLOCK2, FILE_WOODBLOCK3, FILE_METAL, FILE_ELEC,\
                     FILE_METALBLOCK, FILE_FRONT_FACE, FILE_FONTE, FILE_FOG, FILE_GLIGHT, \
                     FILE_FLARE, FILE_BOXFLARE, FILE_SPOTLIGHT, FILE_STARS}

typedef struct
        {
        int width;
        int height;
        void * data;
        GLenum datatype;
        } picdata;


#define TEX_PICFACE 0
#define TEX_MAXPIC 0

#define FILE_FACE "face.tga"
#define TEXPICLIST {FILE_FACE}

void PrepareTexture (int TextureRef);
void KillTextures ();
void* GetPicture (int PicRef, int* width, int* height, GLenum* DataType);
void LoadTextures ();
void SetTexture (int texNumber, GLint internalFormat, int width, int height, GLenum format, GLenum type, void *texels);
#endif
